package com.education.db.domain;

import javax.persistence.*;
import java.util.List;

/**
 * Created by Fan on 2016/9/26.
 */
@Entity
@Table(name = "info_catagory", schema = "db_education", catalog = "")
public class InfoCatagory {
    private int caId;
    private String caValue;
    private String caName;

    @Id
    @Column(name = "ca_id")
    public int getCaId() {
        return caId;
    }

    public void setCaId(int caId) {
        this.caId = caId;
    }

    @Basic
    @Column(name = "ca_value")
    public String getCaValue() {
        return caValue;
    }

    public void setCaValue(String caValue) {
        this.caValue = caValue;
    }

    @Basic
    @Column(name = "ca_name")
    public String getCaName() {
        return caName;
    }

    public void setCaName(String caName) {
        this.caName = caName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InfoCatagory that = (InfoCatagory) o;

        if (caId != that.caId) return false;
        if (caValue != null ? !caValue.equals(that.caValue) : that.caValue != null) return false;
        if (caName != null ? !caName.equals(that.caName) : that.caName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = caId;
        result = 31 * result + (caValue != null ? caValue.hashCode() : 0);
        result = 31 * result + (caName != null ? caName.hashCode() : 0);
        return result;
    }
}
